/**
 * 
 */
package com.ihg.hiex.entity.session.before.delegatework;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ihg.hiex.entity.user.Delegate;

/**
 * @author houtao
 *
 */
@Entity
@Table(name = "delegate_wrok_training")
public class DelegateWrokTraining {
    
    @Id
    @GeneratedValue
    private Long id;
    
    @JsonIgnore
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Delegate delegate;
    
    /** 课程名称  */
    private String courseName;
    
    /** 内部还是外部 */
    private String interiorOrExterior;
    
    /** 参与年份   */
    private String attendYear;
    
    /** 是否获得证书   */
    private String certificate;
    
    /** 是否启用 */
    @Column(name = "is_disabled")
    private boolean disabled;

	/**
	 * the default constructor.
	 */
	public DelegateWrokTraining() {
	}
	
	/**
	 * 
	 * @param delegate
	 * @return
	 */
	public DelegateWrokTraining init(Delegate delegate) {
		this.delegate = delegate;
		this.disabled = false;
		return this;
	}
	
	/**
	 * 
	 * @return
	 */
	public DelegateWrokTraining disabled() {
		this.disabled = true;
		return this;
	}
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return the delegate
	 */
	public Delegate getDelegate() {
		return delegate;
	}

	/**
	 * @return the courseName
	 */
	public String getCourseName() {
		return courseName;
	}

	/**
	 * @return the interiorOrExterior
	 */
	public String getInteriorOrExterior() {
		return interiorOrExterior;
	}

	/**
	 * @return the attendYear
	 */
	public String getAttendYear() {
		return attendYear;
	}

	/**
	 * @return the certificate
	 */
	public String getCertificate() {
		return certificate;
	}

	/**
	 * @return the disabled
	 */
	public boolean isDisabled() {
		return disabled;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @param delegate the delegate to set
	 */
	public void setDelegate(Delegate delegate) {
		this.delegate = delegate;
	}

	/**
	 * @param courseName the courseName to set
	 */
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	/**
	 * @param interiorOrExterior the interiorOrExterior to set
	 */
	public void setInteriorOrExterior(String interiorOrExterior) {
		this.interiorOrExterior = interiorOrExterior;
	}

	/**
	 * @param attendYear the attendYear to set
	 */
	public void setAttendYear(String attendYear) {
		this.attendYear = attendYear;
	}

	/**
	 * @param certificate the certificate to set
	 */
	public void setCertificate(String certificate) {
		this.certificate = certificate;
	}

	/**
	 * @param disabled the disabled to set
	 */
	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}
}
